home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
151-175
/
scopedisk160
/
rexxarplib252
/
rexx
/
getall.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-19
|
960b
|
50 lines
/** getall.rexx
*
* This function edits all specified files in which a certain
* string occurs, and puts the cursor at the first occurrence.
*
**/
parse arg fn ss
ss = strip(ss)
options prompt "Next? "
if ss = "" then do
say "Usage: getall <wildcards> <search string>"
exit
end
if ~show('l','rexxarplib.library') then addrexxlib
'search 'fn' 'ss' quiet | execio stem files.'
if files.0 = 0 then do
call postmsg(100,100,"No files found")
call delay 120
call postmsg()
exit
end
do i = 1 to files.0
if files.i = "" then leave
if i ~= 1 then do
call open(PULLWIN,"con:100/100/130/50/GetAll")
call writech(PULLWIN,"Next? ")
yesno = readln(PULLWIN)
if left(yesno, 1) = 'n' then do
say "Aborted"
exit
end
call close(PULLWIN)
end
call setenv('Search', ss)
'e 'files.i' startup getall.txed sticky'
end
call postmsg(100,100,"Done")
call delay 120
call postmsg()
exit